<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <link href="logo.png" rel="apple-touch-icon-precomposed">
    <link href="logo.png" sizes="114x114" rel="apple-touch-icon-precomposed">

    <link rel="shortcut icon" href="logo.png">
    <link rel="icon" href="logo.png">
    <link rel="Bookmark" href="logo.png">
    <link rel="apple-touch-icon" href="logo.png">
    <!--ios和Android都支持-->
    <link rel="apple-touch-icon-precomposed" href="logo.png">
    <script type="text/javascript" src="./mobile-util.js"></script>
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
    <title>军政宝</title>
    <style>
        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 99999;
            display: flex;
            flex-flow: row nowrap;
            justify-content: center;
            align-items: center;
            background: none repeat scroll 0 0 #ffffff;
        }

        .sk-spinner-pulse {
            width: 60px;
            height: 60px;
            background-color: #222;
            border-radius: 100%;
            -webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out;
            animation: sk-pulseScaleOut 1s infinite ease-in-out;
        }

        @-webkit-keyframes sk-pulseScaleOut {
            0% {
                -webkit-transform: scale(0);
                transform: scale(0);
            }

            100% {
                -webkit-transform: scale(1);
                transform: scale(1);
                opacity: 0;
            }
        }

        @keyframes sk-pulseScaleOut {
            0% {
                -webkit-transform: scale(0);
                transform: scale(0);
            }

            100% {
                -webkit-transform: scale(1);
                transform: scale(1);
                opacity: 0;
            }
        }
    </style>
</head>

<body>
    <noscript>
        <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
            Please enable it to continue.</strong>
    </noscript>
    <div id="preloader">
        <div class="sk-spinner sk-spinner-pulse"></div>
    </div>
    <div id="app"></div>
    <!-- built files will be auto injected -->
</body>
<script type="text/javascript">
    document.addEventListener('plusready', function () {
        var webview = plus.webview.currentWebview();
        plus.key.addEventListener('backbutton', function () {
            webview.canBack(function (e) {
                if (e.canBack) {
                    webview.back();
                } else {
                    //webview.close(); //hide,quit
                    //plus.runtime.quit();
                    //首页返回键处理
                    //处理逻辑：1秒内，连续两次按返回键，则退出应用；
                    var first = null;
                    plus.key.addEventListener('backbutton', function () {
                        //首次按键，提示‘再按一次退出应用’
                        if (!first) {
                            first = new Date().getTime();
                            console.log('再按一次退出应用');
                            setTimeout(function () {
                                first = null;
                            }, 1000);
                        } else {
                            if (new Date().getTime() - first < 1500) {
                                plus.runtime.quit();
                            }
                        }
                    }, false);
                }
            })
        });
    });
</script>
<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?75f34093b2771ed8ea71f195093f66d8";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<script>
    // fnResize();
    // window.onresize = function () {
    //     fnResize();
    // }

    // function fnResize() {
    //     var deviceWidth = document.documentElement.clientWidth || window.innerWidth;
    //     if (deviceWidth >= 750) {
    //         deviceWidth = 750;
    //     }
    //     if (deviceWidth <= 320) {
    //         deviceWidth = 320;
    //     }
    //     document.documentElement.style.fontSize = (deviceWidth / 7.5) + 'px';
    // }


    window.onload = function () {
        setTimeout(function () {
            document.getElementById("preloader").style.display = "none";
        }, 100)
    }
</script>

</html>